package com.jinhongone.context.utils;

/**
 * @author Administrator
 * @version 1.0
 * @description: 封装String工具类
 * @date 2025/4/26 10:54
 */
public class StringUtils {
    //私有化构造函数
    private StringUtils() {
    }

    //判断String为empty
    public static boolean isEmpty(String str) {
        return str == null || str.isEmpty();
    }

    //判断String不为empty
    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }

    //根据属性Name返回set方法名称
    public static String getSetMethodName(String propertyName) {
        if (isEmpty(propertyName)) return null;
        return "set" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
    }
}
